package com.ruoyi.house_sale.domain;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠方案对象 discount
 * 
 * @author ruoyi
 * @date 2022-04-15
 */
public class Discount extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long discountid;

    /** 优惠方案名称 */
    @Excel(name = "优惠方案名称")
    private String discountname;

    /** 单价优惠 */
    @Excel(name = "单价优惠")
    private BigDecimal unitprice;

    /** 总价优惠 */
    @Excel(name = "总价优惠")
    private BigDecimal totalprice;

    /** 折扣优惠 */
    @Excel(name = "折扣优惠")
    private BigDecimal discountpercent;

    /** 是否有效（有效，无效） */
    @Excel(name = "是否有效", readConverterExp = "有=效，无效")
    private String invalid;

    /** 优惠方案说明 */
    @Excel(name = "优惠方案说明")
    private String description;

    /** 创建时间 */
    private Date createtime;

    /** 创建人姓名 */
    @Excel(name = "创建人姓名")
    private String username;

    public void setDiscountid(Long discountid) 
    {
        this.discountid = discountid;
    }

    public Long getDiscountid() 
    {
        return discountid;
    }
    public void setDiscountname(String discountname) 
    {
        this.discountname = discountname;
    }

    public String getDiscountname() 
    {
        return discountname;
    }
    public void setUnitprice(BigDecimal unitprice) 
    {
        this.unitprice = unitprice;
    }

    public BigDecimal getUnitprice() 
    {
        return unitprice;
    }
    public void setTotalprice(BigDecimal totalprice) 
    {
        this.totalprice = totalprice;
    }

    public BigDecimal getTotalprice() 
    {
        return totalprice;
    }
    public void setDiscountpercent(BigDecimal discountpercent) 
    {
        this.discountpercent = discountpercent;
    }

    public BigDecimal getDiscountpercent() 
    {
        return discountpercent;
    }
    public void setInvalid(String invalid) 
    {
        this.invalid = invalid;
    }

    public String getInvalid() 
    {
        return invalid;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getCreatetime() {
        return createtime;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("discountid", getDiscountid())
            .append("discountname", getDiscountname())
            .append("unitprice", getUnitprice())
            .append("totalprice", getTotalprice())
            .append("discountpercent", getDiscountpercent())
            .append("invalid", getInvalid())
            .append("description", getDescription())
            .append("createtime", getCreatetime())
            .append("username", getUsername())
            .toString();
    }
}
